import traceback

try:
    1 / 0
except Exception as e:
    print("发生错误:", e)
    print("堆栈跟踪:", traceback.format_exc())
